package it.asvp.asvp_portal.service.services;

import java.util.List;

import it.asvp.asvp_portal.asvp_util.enumerative.Role;
import it.asvp.asvp_portal.data.entity.member.MemberAccount;

import org.springframework.security.core.userdetails.UserDetails;

public interface MemberAccountService {

	public boolean isMember(UserDetails userDetails);
	
	public boolean isCouncilor(UserDetails userDetails);
	
	public boolean isPresident(UserDetails userDetails);
	
	public boolean isAdmin(UserDetails userDetails);
	
    public void createAccount(UserDetails userDetails,MemberAccount transientMemberAccount) throws Exception;
	
    public void createAccountByEmail(UserDetails userDetails,MemberAccount transientMemberAccount,String email) throws Exception;
	
    public void updateAccount(UserDetails userDetails,Long oldAccountId,MemberAccount newAccount) throws Exception;
	
	public void deleteAccount(UserDetails userDetails,MemberAccount persistentAccount) throws Exception;
		
	public MemberAccount getAccountByMemberId(Long memberId) throws Exception;
	
	public Role getRole(UserDetails userDetails);
	
	public List<MemberAccount> getAllAccounts();
}
